const Router = require('koa-router')
// const { upload, addNews, getNewsList, updateNews, deleteNews, getNewsDetail } = require('../controller/news.controller')
// const { validateNews, PageSizeOrPage } = require('../middleware/news.middleware')
const { login,register,updatePassword,getUserInfo } = require('../controller/user')
// const { auth, hasAdminPermission } = require('../middleware/auth.middleware') // 判断是否含有token，以及是否有管理员权限验证
// console.log(getUserInfo);

const router = new Router();


router.post('/login',login); // 登录
router.post('/register',register); // 注册
router.post('/updatePassword', updatePassword); // 修改密码
router.get('/getUserInfo', getUserInfo);// 用户信息


module.exports = router; // 导出router